import React, { Component } from 'react'
import { Form, Input } from 'antd'
let FormItem = Form.Item
class FormComponent extends Component {
    render() {
        const { getFieldDecorator } = this.props.form
        return (
            <Form>
                <FormItem label={this.props.name}>
                    {getFieldDecorator('form.form2', {
                        rules: [
                            { required: true, message: `请输入${this.props.name}` }
                        ]
                    })(
                        <Input placeholder='form2' />
                    )}
                </FormItem>

            </Form>
        )
    }
}
export default Form.create()(FormComponent)
